#! /bin/bash
rm -rf BUILD
cp -r py-configurator BUILD
DIR=`pwd`
cd BUILD
find -type d | xargs chmod 755 
find -type d | xargs chown root 

find -type f | xargs chmod 640 
find -type f | xargs chown root 
chmod 755 usr/bin/py-configurator.py
chmod 755 DEBIAN/postinst
find -type d -name .svn | xargs rm -rf

cd $DIR
dpkg -b BUILD py-configurator_0.11-1_all.deb
